package com.xzh.springCloud.service.impl;

import com.xzh.springCloud.dao.StorageDao;
import com.xzh.springCloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: zhiHong
 * @CreateTime: 2023-08-31 22:36
 * @Description:
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {
    @Resource
    private StorageDao storageDao;
    @Override
    public void reduce(Long productId, Integer amount) {
        log.info("========seata_storage_micro_service-10010 库存减少开始========");
        storageDao.reduce(productId, amount);
        log.info("========seata_storage_micro_service-10010 库存减少结束========");
    }
}
